package com.lagou.sqlsession;

import java.util.List;

/**
 * @Description:
 * @author liujunling
 * @date 2020/3/31
 */
public interface SqlSession {
    /**
     * 查询多个
     * @param statementId
     * @param params
     * @param <T>
     * @return
     */
    <T> List<T> selectList(String statementId, Object... params) throws Exception;

    /**
     * 查询一个
     * @param statementId
     * @param params
     * @param <T>
     * @return
     */
    <T> T selectOne(String statementId, Object... params) throws Exception;

    /**
     * 构建代理对象
     * @param mapperInterface
     * @param <E>
     * @return
     */
    <E> E getMapper(Class<E> mapperInterface) throws Exception;
}
